<?php
/**
 * @version $Id: sketchup.html.php,v 1.4 2009/06/04 20:13:37 dgravato Exp $
 * @package    sketchup
 * @subpackage 

 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 31-Mar-2009
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

class HTML_sketchup
{
	
	function showSketchups($rows, $option)
	{
		?><table><h2>Entries:</h2><br/><?php
		foreach($rows as $row)
		{
			$link = JRoute::_('index.php?option=' . $option . '&id=' . $row->id .  '&task=view');
			echo '<tr><td><ul class="menu"><li><a href="' . $link . '">' .$row->p_title. ' by '. $row->fullname . '</a></li></ul><br/></td></tr>';
		}
		?></table><?php
	}



	 // basic function to show a review
    //  nothing fancy pull the entry fields out one by one 
    //  this will change as design evolves and when switching to MVC later in dev cycyle
    
	function showSketchup($row, $option) 
	{
	
	

		?> <!--lot's of work to be done for image and video processing -->
		
		<iframe src="<?php $m_clean = str_replace( "/details", "/mini", $row->m_url); echo $m_clean; ?>" width="400" height="300" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></iframe>
		<p><strong>3d Warhouse URL: </strong> <a href="<?php echo $row->m_url; ?>" target="_blank"><?php echo $row->m_url; ?></a></p>
		<p class="contentheading"><strong><?php echo $row->p_title; ?> by <i><?php echo $row->fullname; ?></i></strong></p>
		<p class="createdate"><strong>Submitted: </strong><?php echo JHTML::Date($row->sub_date); ?></p> 
		<p><strong>Project Title :</strong> <?php echo $row->p_title; ?></p> 
		<p><strong>Project Description :</strong> <?php echo $row->p_description; ?></p> 
		<p><strong>Image #1: </strong><p><img src="<?php echo $row->image1; ?>"/></p> 
		<p><strong>Image #2: </strong><p><img src="<?php echo $row->image2; ?>"/></p> 
		<p><strong>Image #3: </strong><p><img src="<?php echo $row->image3; ?>"/></p> 
		 
		<p><strong>Google Video/YouTube: </strong> <?php echo $row->v_url; ?></p> 
		<p><object width="320" height="265">
		<param name="movie" value="<?php $v_clean = str_replace("http://www.youtube.com/watch?v=", "http://www.youtube.com/v/", $row->v_url); echo $v_clean;?>&hl=en&fs=1"></param>
		<param name="allowFullScreen" value="true"></param>
		<param name="allowscriptaccess" value="always"></param>
		<embed src="<?php $v_clean = str_replace("http://www.youtube.com/watch?v=", "http://www.youtube.com/v/", $row->v_url); echo $v_clean;?>&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object></p>
		<p><strong>YouTube Link Code: </strong><input class="text_area" type="text" name="embed" 
			   id="embed" size="50" value="<?php echo $row->v_url; ?>"/></p>
		
		<?php $link = JRoute::_('index.php?option=' . $option) ; ?> 
		<a href="<?php echo $link; ?>">&lt; return to competition entires list</a> 
		<?php 
	}
	
} //this is the end
	
?>